/**
 * 
 */
package unittesting;

import operrators.OperatorUtils;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

/**
 * @author Administrator
 * 
 */
public class OperatorTestUnit
{

	/**
	 * @throws java.lang.Exception
	 */
	@BeforeClass
	public static void setUpBeforeClass() throws Exception
	{
		System.out.println("setUpBeforeClass() method is executed");
	}

	/**
	 * @throws java.lang.Exception
	 */
	@AfterClass
	public static void tearDownAfterClass() throws Exception
	{
		System.out.println("tearDownAfterClass() method is executed");
	}

	/**
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception
	{
		System.out.println("steUp() method is executed");
	}

	/**
	 * @throws java.lang.Exception
	 */
	@After
	public void tearDown() throws Exception
	{
		System.out.println("tearDown() method is executed");
	}

	@Test
	public void testMutiply()
	{
		System.out.println("testMutilply() method is executed");
		int[] nums = { 1, 4, 5 };
		double total = OperatorUtils.multilply(nums);
		Assert.assertTrue(total == 20);
	}

	@Test
	public void testSum()
	{
		System.out.println("testSum() method is excuted");
		int[] nums = { 1, 4, 5 };
		int total = OperatorUtils.sum(nums);
		Assert.assertTrue(total == 10);
	}

}
